package com.fare.taluo.core.domain.analyse.report.upload;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.dayatang.domain.InstanceFactory;
import com.fare.taluo.base.ddd.domain.BaseEntity;

/**
 * 报告上传信息表
 * @author hk
 *
 */
@javax.persistence.Entity
@Table(name = "FDC_REPORT_UPLOAD_INFO")
public class ReportUploadInfo extends BaseEntity  {
	
	private static final long serialVersionUID = 1L;
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Long id;
	
	@Column(name="name",length=100)
	private String name;//报告名称
	
	@Column(name="escribe",length=250)
	private String escribe;//报告描述
	
	@Column(name="upload_date")
	@Temporal(TemporalType.TIMESTAMP)
	private Date uploadDate;//上传时间
	
	@Column(name="operator",length=35)
	private String operator;//上传人

	@Column(name="path",length=255)
	private String path;//文件的路径
	
	@Column(name="report_year")
	private int report_year;//报告年份
	
	@Column(name="report_month")
	private int report_month;//报告月份
	@Override
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getEscribe() {
		return escribe;
	}

	public void setEscribe(String escribe) {
		this.escribe = escribe;
	}

	public Date getUploadDate() {
		return uploadDate;
	}

	public void setUploadDate(Date uploadDate) {
		this.uploadDate = uploadDate;
	}

	public String getOperator() {
		return operator;
	}

	public void setOperator(String operator) {
		this.operator = operator;
	}
	
	
	public String getPath() {
		return path;
	}

	public void setPath(String path) {
		this.path = path;
	}

	public int getReport_year() {
		return report_year;
	}

	public void setReport_year(int report_year) {
		this.report_year = report_year;
	}

	public int getReport_month() {
		return report_month;
	}

	public void setReport_month(int report_month) {
		this.report_month = report_month;
	}


	private static ReportUploadInfoRepository repository;
	
	protected static ReportUploadInfoRepository getReportUploadInfoRepository(){
		if(repository == null){
			repository = InstanceFactory.getInstance(ReportUploadInfoRepository.class);
		}
		
		return repository;
	}
	
	
	public static ReportUploadInfo get(long id){
		return getReportUploadInfoRepository().get(id);
	}
	
}
